package com.dream.utils.email;

import java.util.Set;
import java.util.concurrent.Callable;

/**
 * @copyright evan
 * @author evan
 * @Revision
 * @date 2012/09/01
 */
public class MailSendingTask  implements Callable<MailSendingResult> {
	
	private EMailBean mail;
	
	private Set<EMailBean> lockSet;

	private MailCenterService mailCenterService;
	
	private MailServerType type;
	
	@Override
	public MailSendingResult call() throws Exception {
		
		return mailCenterService.sendMail(mail,type);
		
	}

	public EMailBean getMail() {
		return mail;
	}


	public void setMail(EMailBean mail) {
		this.mail = mail;
	}

	public Set<EMailBean> getLockSet() {
		return lockSet;
	}

	public void setLockSet(Set<EMailBean> lockSet) {
		this.lockSet = lockSet;
	}

	public MailServerType getType() {
		return type;
	}

	public void setType(MailServerType type) {
		this.type = type;
	}
	
	public void setMailCenterService(MailCenterService mailCenterService) {
		this.mailCenterService = mailCenterService;
	}
}
